package com.michaelbulava.TFS.vcs.internal.providers;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.CheckoutProvider;
import com.michaelbulava.TFS.Messages;
import com.michaelbulava.TFS.ui.wizards.checkout.CheckoutWizard;
import com.michaelbulava.TFS.vcs.TFSVcs;

/**
 * Created by mbulava on 6/22/2015.
 */
public class TFSCheckoutProvider implements CheckoutProvider {
    @Override
    public void doCheckout(Project project, Listener listener) {
        CheckoutWizard wizard = new CheckoutWizard(project);
        if (wizard.showAndGet()){
            //TODO get the freaking project/modules and open.
            wizard.performCheckout(project, listener);
        }
    }

    @Override
    public String getVcsName() {
        return Messages.getString("TFSCheckoutProvider.VCSName");
    }
}
